import requests

url = "http://localhost:8001/joke/invoke"

# 注意template格式, 传参的变量名要与server中定义的一致，这里是topic
response = requests.post(url, json={'input':{"topic": "职场"}})

print(response.json().get("output"))